<template>
  <div id="staff-app">
    <el-container>
      <el-aside width="200px">
        <el-menu
          default-active="/Home/StaffAdmin/organization"
          class="el-menu-vertical-demo"
          @open="handleOpen"
          @close="handleClose"
          background-color="#F6F9FE"
          text-color="#506480"
          active-text-color="#488CEE"
          :default-openeds="openeds"
          :router="true"
        >
          <el-menu-item index="/Home/StaffAdmin/organization">
            <i class="el-icon-s-platform"></i>
            <span slot="title">组织架构</span>
          </el-menu-item>

          <el-menu-item index="/Home/StaffAdmin/postadmin">
            <i class="el-icon-s-platform"></i>
            <span slot="title">岗位管理</span>
          </el-menu-item>

          <el-menu-item index="/Home/StaffAdmin/employeelist">
            <i class="el-icon-s-custom"></i>

            <span slot="title">员工列表</span>
          </el-menu-item>
        </el-menu>
      </el-aside>
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </div>
</template>

<script>
export default {
  data() {
    return {
      openeds: ["1"],
    };
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
  },
};
</script>

<style lang="less" scoped>
// 导航栏高度
#staff-app,
.el-container,
.el-menu-vertical-demo {
  height: 100%;
}

.el-menu-vertical-demo {
  border: none;
}

.el-menu-item:hover {
  background: #e4eefc !important;
}

.el-menu-item.is-active {
  background: #e4eefc !important;
}

.el-main {
  padding: 0;
}
</style>
